﻿/**
 *
 * @file PhysicsDialogGeneralLaminate.h
 * @brief  自由阻尼板物理属性对话框声明
 * @author wangning (2185896382@qq.com)
 * @date 2024-12-11
 *
 */
#ifndef __GUIPhysicsDialogGeneralLaminate_H__
#define __GUIPhysicsDialogGeneralLaminate_H__

#include "AbstractPhysicsDialog.h"


class QComboBox;
namespace Ui
{
    class PhysicsDialogGeneralLaminate;
}
namespace GUI
{
    /**
     * @brief  自由阻尼板物理属性对话框声明
     * @author wangning (2185896382@qq.com)
     * @date 2024-12-11
     */
    class GUIPhyscisDialogAPI PhysicsDialogGeneralLaminate : public AbstractMaterialDialog
    {
        Q_OBJECT
    public:
        /**
         * @brief Construct a new Physics Property General Laminate Dialog object
         * @param[i]  type           操作类型
         * @param[i]  propid          物理属性ID
         * @param[i]  parent         父对象
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        explicit PhysicsDialogGeneralLaminate(PhysicsDlgExecType type, int propid = -1, QWidget* parent = nullptr);
        /**
         * @brief Destroy the Physics Property General Laminate Dialog object
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        virtual ~PhysicsDialogGeneralLaminate();

    private slots:
        /**
         * @brief 确认按钮点击事件
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        void on_pushButton_OK_clicked();
        /**
         * @brief 取消按钮点击事件
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        void on_pushButton_Cancel_clicked();
        /**
         * @brief 插入按钮槽函数
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-10-28
         */
        void on_pushButton_insert_clicked();
        /**
         * @brief 添加按钮槽函数
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-10-28
         */
        void on_pushButton_add_clicked();
        /**
         * @brief 删除按钮槽函数
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date 2024-10-28
         */
        void on_pushButton_delete_clicked();
        /**
         * @brief 阻尼下拉框使能状态
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        void slot_comboBox_currentText(QString str);

    private:
        /**
         * @brief 初始化窗口
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        void init();
        /**
         * @brief 检查输入
         * @return true  输入没有错误
         * @return false  输入有错误
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        bool checkInput();
        /**
         * @brief 初始化材料下拉框
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        void initializeMaterialComboBox(QComboBox* comboBox);

        /**
         * @brief 初始化频谱下拉框
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-11
         */
        void initializeSpectraComboBox(QComboBox* comboBox);

    private:
        /**
         * @brief UI对象
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-06
         */
        Ui::PhysicsDialogGeneralLaminate *_ui{};
    };
}
#endif